// axios 基于XMLHttpRequest 封装
export function ajaxGet(url, callback) {
  const xhr = new XMLHttpRequest();
  xhr.open('GET', url);
  xhr.send(null);
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState === 4) {
      if (xhr.status === 200 && xhr.status < 300) {
        callback(xhr.responseText);
      }
    }
  };
}
